@file:OptIn(ExperimentalUuidApi::class)

package com.harth.blemultiplatform.ble

import com.harth.blemultiplatform.ble.core.BondState
import com.harth.blemultiplatform.ble.core.ConnectionParameters
import com.harth.blemultiplatform.ble.core.ConnectionPriority
import com.harth.blemultiplatform.ble.core.PeripheralType
import com.harth.blemultiplatform.ble.core.Phy
import com.harth.blemultiplatform.ble.core.PhyInUse
import com.harth.blemultiplatform.ble.core.PhyOption
import com.harth.blemultiplatform.ble.core.WriteType
import kotlinx.coroutines.flow.StateFlow
import platform.CoreBluetooth.CBPeripheral
import kotlin.uuid.ExperimentalUuidApi
import kotlin.uuid.Uuid

class NativePeripheral(val peripheral: CBPeripheral): IPeripheral {
    override val name: String?
        get() = peripheral.name

    override val address: String
        get() = peripheral.identifier.UUIDString

    override val bondState: StateFlow<BondState>
        get() = TODO("Not yet implemented")

    override val connectionParameters: StateFlow<ConnectionParameters?>
        get() = TODO("Not yet implemented")

    override val phy: StateFlow<PhyInUse?>
        get() = TODO("Not yet implemented")

    override val type: PeripheralType
        get() = TODO("Not yet implemented")

    override suspend fun readPhy(): PhyInUse {
        TODO("Not yet implemented")
    }

    override suspend fun createBond() {
        TODO("Not yet implemented")
    }

    override suspend fun removeBond() {
        TODO("Not yet implemented")
    }

    override suspend fun requestConnectionPriority(priority: ConnectionPriority): ConnectionParameters {
        TODO("Not yet implemented")
    }

    override suspend fun setPreferredPhy(
        txPhy: Phy,
        rxPhy: Phy,
        phyOptions: PhyOption
    ): PhyInUse {
        TODO("Not yet implemented")
    }

    override fun maximumWriteValueLength(type: WriteType): Int {
        TODO("Not yet implemented")
    }

    override fun services(uuids: List<Uuid>): StateFlow<List<IService>?> {
        TODO("Not yet implemented")
    }

    override suspend fun readRssi(): Int {
        TODO("Not yet implemented")
    }

    override suspend fun disconnect(): Boolean {
        TODO("Not yet implemented")
    }

    override fun close() {
        TODO("Not yet implemented")
    }
}